package com.lx.pc.restful.util;

import java.io.Serializable;

import com.lx.pc.restful.util.SystemEnums.ErrorCode;

/**
 * 
 * @author houzhong
 *  ajax 通用返回
 * @param <T>
 */
public class AjaxResult <T> implements Serializable {

	private static final long serialVersionUID = -7775868898873862469L;

	private Integer code = 200;
	private String msg = "success";
	private T result;

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public void setMsg(ErrorCode errorCode) {
		this.code = errorCode.getCode();
		this.msg = errorCode.getMsg();
	}

	public T getResult() {
		return result;
	}

	public void setResult(T result) {
		this.result = result;
	}

}
